﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<EKAABSInformationManagement.Database.cardInBell>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    员工卡管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="<%: Url.Content("~/Scripts/userJs/jquery.uiTableFilter.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/userJs/card.js") %>" type="text/javascript"></script>
    <div class="dashboard">
        <input type="button" id="btnInsert" value="添加员工卡" class="addUpdateCard" />
        <input type="button" id="btnDelete" value="删除选中卡号" />
        <input type="button" id="btnBatchUpdate" value="批量修改" class="batchUpdateCard" />
    </div>
    <div class="content">
        <p class="thead">
        </p>
        <table id="tblMain">
            <thead>
                <tr>
                    <th>
                        <input id="cbkAll" type="checkbox" />
                    </th>
                    <th scope="col">
                        卡号
                    </th>
                    <th scope="col">
                        状态
                    </th>
                    <th scope="col">
                        OWNER
                    </th>
                    <th scope="col">
                        最近更新时间
                    </th>
                    <th scope="col">
                    </th>
                </tr>
            </thead>
            <tbody>
                <%foreach (var a in Model)
                  {%>
                <tr>
                    <td class="row">
                        <input id="<%=a.cardNo %>" type="checkbox" />
                    </td>
                    <td class="row">
                        <%=a.cardNo%>
                    </td>
                    <td class="row" status="<%=a.status %>">
                        <%= Enum.GetName(typeof(EKAABSInformationManagement.Service.status), a.status)%>
                    </td>
                    <td class="row" >
                        <%=a.belongto %>
                    </td>
                    <td class="row">
                        <%=a.latestUpdateDate == null ? "" : a.latestUpdateDate.Value.ToShortDateString()%>
                    </td>
                    <td class="row">
                        <input class="addUpdateCard" id="btnUpdate" type="button" name="update" value="修改" />
                    </td>
                </tr>
                <%} %>
            </tbody>
        </table>
    </div>
    <div id="greybackground">
    </div>
        <div class="batchWindow">
        <p class="closePopup">
        </p>
        <h2 class="titlePopup">
            批量修改磁卡状态
        </h2>
        <table class="tbladd">
        <tr>
            <td>
                网络状态：
            </td>
            <td>
                <select id="batchStatus">
                    <option value="1">正常状态</option>
                    <option value="2">两周内过期</option>
                    <option value="3">已经过期</option>
                </select>                
            </td>
        </tr>
        <tr>
            <td>
                最近续办日期：
            </td>
            <td>
                <input id="batchDate" type="text" />
            </td>   
        </tr>
        <tr>
            <td>
            </td>
            <td style="text-align: right;">
                <input class="loginBtn" type="button" id="batchSubmit" value="确定" />
            </td>
            <td style="text-align: center;">
                <input class="loginBtn" type="reset" id="batchReset" value="清空" />
            </td>
            <td>
            </td>
        </tr>
        </table>
    </div>

    <div class="popupWindow">
        <p class="closePopup">
            </p>
        <h2 class="titlePopup">
            添加新的员工卡</h2>
        <table class="tbladd">
            <tr>
                <td>
                    卡号：
                </td>
                <td>
                    <input id="cardNo" type="text" /><span> *</span>
                </td>
                <td>
                    卡状态：
                </td>
                <td>
                    <select id="cardstatus">
                        <option value="1">正常状态</option>
                        <option value="2">两周内过期</option>
                        <option value="3">已经过期</option>
                    </select>
                    <span>*</span>
                </td>
            </tr>
            <tr>
                <td>
                    OWNER：
                </td>
                <td>
                    <select id="cardBelongsTo" />
                </td>
                <td>
                    最近更新时间：
                </td>
                <td>
                    <input id="cardlatestUpdateDate" name="cardlatestUpdateDate" type="text" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="text-align: right;">
                    <input class="loginBtn" type="button" id="btnSubmit" value="确定" />
                </td>
                <td style="text-align: center;">
                    <input class="loginBtn" type="reset" id="btnReset" value="清空" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
